package com.thingsgrid.notice.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
/**
 * BaseEntity
 * @author MQ
 */
@Data
public class BaseEntity implements Serializable{
    @ApiModelProperty(value = "mongoID")
    private String id;
    @ApiModelProperty(value = "创建时间")
    @Field("create_time")
    @JsonProperty("create_time")
    private String createTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
    @ApiModelProperty(value = "更新时间")
    @Field("update_time")
    @JsonProperty("update_time")
    private String updateTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");;
}
